/**
 * @brief 光照强度传感器
 */
#pragma once

#include "BridgedDevice.h"

class LightSensor final : public BridgedDevice
{
public:
    static constexpr DeviceTypeId kDeviceTypeLightSensor = 0x0106;
    explicit LightSensor(const BasicInformation* node);

    [[nodiscard]] uint16_t GetMeasuredValue() const { return mMeasurement; }
    void SetMeasuredValue(uint16_t measurement);

    Protocols::InteractionModel::Status ReadAttribute(
        ClusterId clusterId,
        AttributeId attributeId,
        uint8_t* buffer,
        uint16_t maxReadLength) override;

    ChipError OnReport(const DataBlock* block) override;

private:
    uint16_t mMeasurement;
};

